package 预习;

import java.util.Scanner;

public class 出勤的情况 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; i <= 30; i++) {
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入您第" + i + "天打卡了吗  0代表你今天没有  1代表你今天打卡了");
            int ka = sc.nextInt();
            if (ka == 1) {
                count++;
            } else if (ka == 0) {
                System.out.println("你今天没有打卡哦");
            } else {
                System.out.println("您输入有误");
            }

        }
        System.out.println("您这个月打卡" + count + "次");
    }
}
